<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
       <input :type="show?'text':'password'" v-model="value">
       <button @click="show=!show">显示</button>
    </div>
</body>
<script src="./vue.js"></script>
<script>
    let{createApp,ref}=Vue;
    createApp({
        setup(){
           let value=ref('');
           let show=ref(false)
            return{
               value,
               show
            }
        }
    }).mount("#app")
</script>
</html>